package utilidades;

import java.text.DecimalFormat;
import java.util.Date;

import org.displaytag.decorator.ColumnDecorator;

public class Decorator_Coluna implements ColumnDecorator {

  private DecimalFormat mMoneyFormat = new DecimalFormat("#,###,##0.00");

  /**
   * Method decorate
   * @param pColumnValue Object
   * @return String
   */
  
  public final String decorate(Object pColumnValue) {
	  String res = "";
	  
	  if (pColumnValue instanceof Float) {		
		  Float num = (Float) pColumnValue;
		  res = mMoneyFormat.format(num);		
	  } else if (pColumnValue instanceof Double) {
		  Double num = (Double) pColumnValue;
		  res = mMoneyFormat.format(num);		
	  }
	  
	  return res;
	
  }
}